<extend name="Layout/ins_page" />
<block name="content">
	{:W('PageHeader/adv_search',array('name'=>$folder_name,'search'=>'M'))}
	<form method="post" name="form_adv_search" id="form_adv_search">
		<div class="adv_search panel panel-default  hidden"  id="adv_search">
			<div class="panel-heading">
				<div class="row">
					<h4 class="col-xs-6">高级搜索</h4>
					<div class="col-xs-6 text-right">
						<a  class="btn btn-sm btn-info" onclick="submit_adv_search();">搜索</a>
						<a  class="btn btn-sm " onclick="close_adv_search();">关闭</a>
					</div>
				</div>
			</div>
			<div class="panel-body">
				<div class="form-group col-sm-6">
					<label class="col-sm-4 control-label" for="li_name">标题：</label>
					<div class="col-sm-8">
						<input  class="form-control" type="text" id="li_name" name="li_name" >
					</div>
				</div>
				<div class="form-group col-sm-6">
					<label class="col-sm-4 control-label" for="li_content">内容：</label>
					<div class="col-sm-8">
						<input  class="form-control" type="text" id="li_content" name="li_content" >
					</div>
				</div>
				<div class="form-group col-sm-6">
					<label class="col-sm-4 control-label" for="eq_user_name">登录人：</label>
					<div class="col-sm-8">
						<input  class="form-control" type="text" id="eq_user_name" name="eq_user_name" >
					</div>
				</div>
				<div class="form-group col-sm-6">
					<label class="col-sm-4 control-label" for="be_create_time">登录时间：</label>
					<div class="col-sm-8">
						<div class="input-daterange input-group" >
							<input type="text" class="input-sm form-control text-center" name="be_create_time" readonly="readonly"/>
							<span class="input-group-addon">-</span>
							<input type="text" class="input-sm form-control text-center" name="en_create_time" readonly="readonly"/>
						</div>
					</div>
				</div>
			</div>
		</div>
	</form>
	<div class="space-8"></div>
	<div class="operate panel panel-default">
		<div class="panel-body">
			<div class="pull-left">
				<ul class="nav nav-pills">
					<li <eq name="fid" value="all">class="active"</eq>>
						<a href="{:U('folder','fid=all')}">所有</a>
					</li>
					<li <eq name="fid" value="todo">class="active"</eq>>
						<a href="{:U('folder','fid=todo')}">邮件
						<notempty name="todo_task_count">
							<span class="badge badge-pink">{$todo_task_count}</span>
						</notempty></a>
					</li>
					<li <eq name="fid" value="dept">class="active"</eq>>
						<a href="{:U('folder','fid=dept')}">审批
						<notempty name="dept_task_count">
							<span class="badge badge-pink">{$dept_task_count}</span>
						</notempty></a>
					</li>
					<li <eq name="fid" value="no_assign">class="active"</eq>>
						<a href="{:U('folder','fid=no_assign')}" >信息
						<notempty name="no_assign_task_count">
							<span class="badge badge-pink">{$no_assign_task_count}</span>
						</notempty></a>
					</li>
				</ul>
			</div>
			<div class="pull-right">
				<a class="btn btn-sm btn-danger" onclick="add()">删除</a>
			</div>
		</div>
	</div>
	<div class="ul_table">
		<ul>
			<li class="thead">
				<div class="pull-left">
					<span class="col-10 ">编号</span>
					<span class="col-10 ">类型</span>
					<span class="col-10 ">操作</span>
					<span class="col-10 ">标题</span>
				</div>
				<div class="pull-right">
					<span class="col-10 ">时间</span>
				</div>
				<div class="auto autocut">
				</div>
			</li>
			<empty name="list">
				<li class="no-data">
					没找到数据
				</li>
				<else/>
				<foreach name="list" item="vo">
					<li class="tbody">
						<div class="pull-left">
							<span class="col-10 ">{$vo.task_no}</span>
							<span class="col-10 ">{$vo.user_name}</span>
						</div>
						<div class="pull-right">
							<span class="col-20 autocut">&nbsp;{$vo.executor|show_contact}</span>
							<span class="col-12">{$vo.create_time|to_date='Y-m-d H:i'}&nbsp;</span>
							<span class="col-12">{$vo.expected_time|substr=0,16}&nbsp;</span>
							<span class="col-6">{$vo.status|task_status}&nbsp;</span>
							<span class="col-6 text-center">
								<if condition="($vo.status lt 3) and ($vo.user_id eq $user_id)">
									<a href="{:U('edit','id='.$vo['id'])}">修改</a>&nbsp;<a href="{:U('del','id='.$vo['id'])}">删除</a>
								</if></span>
						</div>
						<div class="auto autocut">
							<a href="{:U('read','id='.$vo['id'])}">{$vo.name}</a>
						</div>
					</li>
				</foreach>
				<div class="pagination">
					{$page}
				</div>
			</empty>
		</ul>
	</div>
</block>
<block name="js">
	<script type="text/javascript">
		function add() {
			window.open("{:U('add')}", "_self");
		}


		$(document).ready(function() {
			set_return_url();
		});
	</script>
</block>
